/**
 * Created by fjlongtou on 2016/11/29.
 */
var ExcelTools = require('../excel/ExcelTools.js');
var dbconfig = require('../dbconfig.js');
var path = require('path');
var DbBase = require('./DbBase.js')
function operateDabatase(config,tables) {
    for (var key in tables) {
        var exceldatas = ExcelTools.getXLSData(path.join(dbconfig.excelDir, tables[key]));
        DbBase.operateTable(config, key, exceldatas);
    }
}
for(var idx=0; idx<dbconfig.dbconfigs.length; idx++)
{
    operateDabatase(dbconfig.dbconfigs[idx].config,dbconfig.dbconfigs[idx].tables);
}
